1. Field of the Invention
The present invention relates to microprocessor instructions, and more particularly, to a system and method for determination of the minimum one of a set of digital values, otherwise referred to as a horizontal minimum.
2. Description of the Related Art
Modern day microprocessors are often configured to perform media instructions to improve the efficiency of multimedia applications and the like. For example, one or more media instructions may be included in the microprocessor architecture to identify a horizontal minimum, which is the minimum one of a set of digital values and its corresponding location in a bus or register or the like. A specific example is the PHMINPOSUW instruction described in the SSE4 Programming Reference manual by Intel®, which determines the location of the minimum 16-bit word of a set of eight unsigned words (128 bits). Certain conventional microprocessors require multiple processing or clock cycles to perform the PHMINPOSUW instruction. As an example, a group of four 16-bit magnitude comparators may be used to identify minimum ones of corresponding pairs of words to reduce the search from 8 to 4 words in a first cycle, the results are fed back to two of the comparators to further reduce the search to two words in a second cycle, and the results are fed back to one of the comparators to find the ultimate minimum word of the set of digital values in the third and last cycle. Alternatively, it is possible to perform the instruction in a single cycle using an increased number of fast 16-bit comparators. As an example, seven fast 16-bit comparators are included in which the first four comparators perform the first comparison of corresponding pairs to reduce the search from 8 to 4 words, the second pair of comparators reduce the search to two words, and the last comparator performs the final comparison to provide the final result in a single cycle. Each 16-bit comparator, however, consumes a significant amount of space on the microprocessor die thereby increasing cost and reducing overall processing efficiency.
There is a need to identify the minimum one of a set of digital values and its corresponding location in a bus or register or the like in a single cycle without a significant increase in circuitry.